package com.stars.pao.message.mapper;

import com.stars.pao.message.model.MessageInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MessageMapper {
//    插入信息
    @Insert("insert into message_info(`from`,`to`,`message`) values(#{from},#{to},#{message})")
    Integer insertMessage(MessageInfo messageInfo);
//    查询信息
    @Select("select * from message_info where delete_flag <> 1")
    List<MessageInfo> queryMessageList();

}
